package list;

import org.apache.commons.collections4.ListUtils;
import org.junit.Test;

import java.util.Arrays;
import java.util.List;

/**
 * @author
 * @Title: TestParititonList
 * @Description:
 * @date 2023/5/26 10:07
 * 好用的切割list的方法
 */
public class TestParititonList {

    @Test
    public void test01(){
        List<String> list = Arrays.asList("a","b","c");
        List<List<String>> partition = ListUtils.partition(list, 2);
        System.out.println(partition);
    }
}
